package com.blog;

import java.util.HashMap;
import java.util.Map;

/**
 * 获取计数网站的统计数据
 */
public class GetStaticsFromBlog {
    final static String COUNTER_URL = "http://amazingcounters.com/login.php";
    final static String GETDATA_URL = "http://amazingcounters.com/data-table.php?id=3202246";

    public static void main(String[] args) {
        // 登录网站
        loginCounterNet();
        // 获取数据
        String tableString = OkHttpUtils.getReqWithRespData(GETDATA_URL);
        System.out.println(tableString);
    }

    private static void loginCounterNet() {
        Map<String, String> requestMap = new HashMap<>();
        requestMap.put("login", "768012449@qq.com");
        requestMap.put("pass", "hax1314");
        OkHttpUtils.postReqWithoutRespData(COUNTER_URL, requestMap);
    }
}